﻿#!/usr/bin/env python
# -*- coding: UTF-8 -*-

class MockEntry:
    def __init__(self, name, status):
        self.__name = name
        self.__status = status

    @property
    def name(self):
        return self.__name

    @property
    def status(self):
        return self.__status

    def __cmp__(self, other):
        result = cmp(self.__name, other.__name)
        if result == 0:
            result = cmp(self.__status, other.__status)

        return result

    def __hash__(self):
        return hash(self.__name)

class MockFileEntry(MockEntry):
    def __init__(self, meta, status):
        MockEntry.__init__(self, meta.name, status)
        self.__meta = meta
        self.__status = status

    @property
    def meta(self):
        return self.__meta

class MockMetaEntry(MockEntry):
    def __init__(self, meta, status):
        MockEntry.__init__(self, meta.name, status)
        self.__meta = meta
        self.__status = status

class MockRepository():
    def __init__(self):
        pass

    def find_packets_by_name(self, name):
        pass

    def find_packet_by_fullname(self, full_name):
        pass

    def find_packets_by_status(self, status):
        pass

    def get_all(self):
        pass

    def get_status(self, full_name):
        pass
        
    def _update_entry_status(self, entry, name):
        pass